using UnityEngine;
using System.Collections;

public class InitTipWindow : MonoBehaviour {
	
	public UILabel titleLabel;
	public UISprite iconSprite;
	//public UISprite iconBgSprite;
	
	public UILabel equipProfessionLabel;
	public UILabel lvLimitLabel;
	
	public UILabel leftButtonStr;
	public UILabel rightButtonStr;
	
	// Use this for initialization
	void Start () {
		titleLabel.text = UIManagement.Instance().tipsTitle;
		
		iconSprite.spriteName = UIManagement.Instance().itemSpriteName;
		
		equipProfessionLabel.text = UIManagement.Instance().equipProfession;
		
		lvLimitLabel.text = UIManagement.Instance().lvLimit;
		
		iconSprite.MakePixelPerfect();
		
		if(UIManagement.Instance().buttonLeftStr == null){
			Transform parent = leftButtonStr.transform.parent;
			parent.gameObject.SetActive(false);
			
			Transform rightParent = rightButtonStr.transform.parent;
			rightParent.localPosition = Vector3.zero;
			
			rightButtonStr.text  = UIManagement.Instance().buttonRightStr;
		} else {
			leftButtonStr.text  = UIManagement.Instance().buttonLeftStr;
			rightButtonStr.text  = UIManagement.Instance().buttonRightStr;
		}
	}
}
